<?php
namespace app\controllers\api\level;

use fate\http\Request;
use app\models\UserLevel;

class GetController extends \fate\web\PureController {
    public function run() {
        $level = new UserLevel();
        $ret = $level->getListByCondition('level_name,minexp,maxexp', '1=1');

        if(null === $ret) {
            $this->ajaxReturn(null, 100008);
            exit;
        }

        $this->ajaxReturn([
            'data' => $ret
        ]);
    }
}
